package com.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.core.domain.Permissions;
import com.core.vo.PermissionVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author legion
 * @description 针对表【permissions】的数据库操作Mapper
 * @createDate 2025-06-1 10:44:45
 * @Entity generator.domain.Permissions
 */
@Mapper
public interface PermissionsMapper extends BaseMapper<Permissions> {
    /**
     * 分页查询
     *
     * @param pageSize
     * @param pageNum
     * @param description
     * @return
     */
    List<Permissions> selectPage(@Param("pageSize") Long pageSize, @Param("pageNum") Long pageNum, @Param("description") String description);

    /**
     * 修改权限信息
     * @param permissionVo
     */
    void updateDescriptionById(@Param("permission") PermissionVo permissionVo);

    /**
     * 根据权限名称查询权限
     * @param name 权限名称 (module:operation_type)
     * @return 权限对象，如果找不到则返回null
     */
    Permissions selectByName(@Param("name") String name);
}




